<script setup lang="ts">
import useInfoStore from '../../stores/modules/info'
const infoStore = useInfoStore()
console.log('pinia -->', infoStore.count)

const handleTap = () => {
  infoStore.updateCount(1)
}
</script>

<template>
  <div style="background: greenyellow">
    <div style="background: red">子组件1：使用选择器API：</div>
    <button @click="handleTap">触发actions函数，count+1</button>
    <h1>state属性count： {{ infoStore.count }}</h1>
    <h1>getters属性total： {{ infoStore.total }}</h1>
  </div>
</template>

<style scoped></style>
